package com.lawyer.entity;

import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户表
 *
 */
@Entity
@Table
public class User extends AbstractAuditingEntity {

	@Id
	private String id;

	@Column(unique = true)
	// 创建约束
	@ApiModelProperty(value = "用户名(手机号码唯一)")
	private String username;

	@ApiModelProperty(value = "密码")
	private String password;

	@ApiModelProperty(value = "昵称")
	private String nickName;

	@ApiModelProperty(value = "坐机号号码")
	private String phone;

	@ApiModelProperty(value = "性别")
	private String sex;

	@ApiModelProperty(value = "年龄")
	private Integer age;

	@ApiModelProperty(value = "头像")
	private String headerIco;

	@ApiModelProperty(value = "我的余额")
	private Double balance;

	@ApiModelProperty(value = "是否可用", hidden = true)
	private Boolean enabled = true;

	@ApiModelProperty(value = "用户类型，userType = 0 普通用户，userType = 1代理,userType = 2团长")
	private String userType = "0";

	@ApiModelProperty(value = "上级代理id")
	private String agentId;
	@ApiModelProperty(value = "上级代理邀请码")
	private String agentCode;

	@ApiModelProperty(value = "可用通话时间(单位分钟)")
	private Long usableTime;

	@ApiModelProperty(value = "分享群次数")
	private Integer shareCount;

	@ApiModelProperty(value = "是否已为代理获取到奖励金,true=已获取,false=未获取")
	private Boolean dedication = false;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@ApiModelProperty(value = "绑定代理时间", example = "2018-07-16 16:44:23", hidden = true)
	private Date bindingDate;

	@Column(unique = true)
	@ApiModelProperty(value = "我的代理二维码/我的邀请码")
	private String qrCode;
	
	@Column(unique = true)
	@ApiModelProperty(value = "我的推荐站长二维码")
	private String recommendQrCode;

	@Column(unique = true)
	@ApiModelProperty(value = "我的团队二维码")
	private String leagueQrCode;

	@ApiModelProperty(value = "绑关系ID")
	private String subsId;

	@ApiModelProperty(value = "隐私号码")
	private String secretNo;

	@ApiModelProperty(value = "咨询费是否已支付,false=未支付,true=已支付", hidden = true)
	private Boolean isCallPay = false;

	private String sessionKey;

	@ApiModelProperty(value = "等级id")
	private String topId;

	@ApiModelProperty(value = "等级划分,默认1级")
	private Integer starLevel = 1;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String getAgentId() {
		return agentId;
	}

	public void setAgentId(String agentId) {
		this.agentId = agentId;
	}

	public Long getUsableTime() {
		return usableTime;
	}

	public void setUsableTime(Long usableTime) {
		this.usableTime = usableTime;
	}

	public Integer getShareCount() {
		return shareCount;
	}

	public void setShareCount(Integer shareCount) {
		this.shareCount = shareCount;
	}

	public Boolean getDedication() {
		return dedication;
	}

	public void setDedication(Boolean dedication) {
		this.dedication = dedication;
	}

	public String getHeaderIco() {
		return headerIco;
	}

	public void setHeaderIco(String headerIco) {
		this.headerIco = headerIco;
	}

	public Date getBindingDate() {
		return bindingDate;
	}

	public void setBindingDate(Date bindingDate) {
		this.bindingDate = bindingDate;
	}

	public String getQrCode() {
		return qrCode;
	}

	public void setQrCode(String qrCode) {
		this.qrCode = qrCode;
	}

	public String getSubsId() {
		return subsId;
	}

	public void setSubsId(String subsId) {
		this.subsId = subsId;
	}

	public String getSecretNo() {
		return secretNo;
	}

	public void setSecretNo(String secretNo) {
		this.secretNo = secretNo;
	}

	public Boolean getIsCallPay() {
		return isCallPay;
	}

	public void setIsCallPay(Boolean isCallPay) {
		this.isCallPay = isCallPay;
	}

	public String getSessionKey() {
		return sessionKey;
	}

	public void setSessionKey(String sessionKey) {
		this.sessionKey = sessionKey;
	}

	public String getAgentCode() {
		return agentCode;
	}

	public void setAgentCode(String agentCode) {
		this.agentCode = agentCode;
	}

	public String getTopId() {
		return topId;
	}

	public void setTopId(String topId) {
		this.topId = topId;
	}

	public Integer getStarLevel() {
		return starLevel;
	}

	public void setStarLevel(Integer starLevel) {
		this.starLevel = starLevel;
	}

	public String getRecommendQrCode() {
		return recommendQrCode;
	}

	public void setRecommendQrCode(String recommendQrCode) {
		this.recommendQrCode = recommendQrCode;
	}

	public String getLeagueQrCode() {
		return leagueQrCode;
	}

	public void setLeagueQrCode(String leagueQrCode) {
		this.leagueQrCode = leagueQrCode;
	}

	
	
}
